package com.minisoft.utils;

import cn.hutool.core.date.DateUtil;
import org.junit.Test;

import java.sql.SQLException;
import java.util.Date;

/**
 * @author JueSu
 * @description: TODO
 * @date 2021/12/20 11:40
 */
public class FixDataMain {

    public static void main(String[] args) throws SQLException {
        CheckData checkData = new CheckData();
        checkData.fileName = DateUtil.format(new Date(), "yyyy-MM-ddHHmmss")+".txt";
        checkData.testUseridByMobile();
        checkData.generateMsgData();
    }

    /**
     * 1、生成补录数据差异及脚本
     */
    @Test
    public void generateUseridData() throws SQLException {
        CheckData checkData = new CheckData();
        checkData.fileName = DateUtil.format(new Date(), "yyyy-MM-ddHHmmss")+".txt";
        checkData.testUseridByMobile();
    }

    /**
     * 2、根据手机号查询消息并生成文件
     */
    @Test
    public void generateMsgData() throws SQLException {
        CheckData checkData = new CheckData();
        checkData.fileName = DateUtil.format(new Date(), "yyyy-MM-ddHHmmss")+".txt";
        checkData.generateMsgData();
    }

    /**
     * 3、根据消息文件发送消息
     */
    @Test
    public void sendMsgData() throws Exception {
        RocketMQTest rocketMQTest = new RocketMQTest();
        rocketMQTest.flushData();
    }

}
